//
//  NoteControlMenuView.m
//  MansApp
//
//  Created by lanou3g on 15/7/23.
//  Copyright (c) 2015年 ACH. All rights reserved.
//

#import "NoteControlMenuView.h"

@implementation NoteControlMenuView

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        self.backButton = [UIButton buttonWithType:UIButtonTypeSystem];
        self.backButton.frame = CGRectMake(0, 0, kP6width(50), kP6Height(50));
        [self.backButton setBackgroundImage:[UIImage imageNamed:@"common_icon_return@3x"] forState:UIControlStateNormal];
        self.backButton.tag = 100;
        
        self.FontBigOrSmall = [UIButton buttonWithType:UIButtonTypeSystem];
        self.FontBigOrSmall.frame = CGRectMake(self.backButton.frame.origin.x + self.backButton.bounds.size.width + kP6width(20), 0, kP6width(80), kP6Height(50));
        [self.FontBigOrSmall setTitle:@"Aa"forState:UIControlStateNormal];
        
        self.FontBigOrSmall.tag = 101;
        
        
        
        self.writeOrRead = [UIButton buttonWithType:UIButtonTypeSystem];
        self.writeOrRead.frame = CGRectMake(self.FontBigOrSmall.frame.origin.x + self.FontBigOrSmall.bounds.size.width + kP6width(10), 0, kP6Height(50), kP6Height(50));
        [self.writeOrRead setBackgroundImage:[UIImage imageNamed:@"readBlack"] forState:UIControlStateNormal];
        self.writeOrRead.tag = 102;
        
        self.writeOrRead.center = CGPointMake(kWidth / 2,kP6Height(25));
        
        self.backgroundView = [UIButton buttonWithType:UIButtonTypeSystem];
        self.backgroundView .frame = CGRectMake(self.writeOrRead.frame.origin.x + self.writeOrRead.bounds.size.width + 20, 0, kP6width(80), kP6Height(50));
        [self.backgroundView  setTitle:@"换张纸"forState:UIControlStateNormal];
        self.backgroundView .tag = 103;
        
        [self.FontBigOrSmall setTintColor:[UIColor blackColor]];
        [self.writeOrRead setTintColor:[UIColor blackColor]];
        [self.backgroundView setTintColor:[UIColor blackColor]];
        
        
        self.FontBigOrSmall.titleLabel.font =  [UIFont fontWithName:@"MarkerFelt-Thin" size:17.5];
        self.writeOrRead.titleLabel.font =  [UIFont fontWithName:@"Helvetica-BoldOblique" size:17.5];
        self.backgroundView.titleLabel.font =  [UIFont fontWithName:@"Helvetica-BoldOblique" size:17.5];
        

        [self addSubview:self.backButton];
        [self addSubview:self.FontBigOrSmall];
        [self addSubview:self.writeOrRead];
        [self addSubview:self.backgroundView];
        
    }
    
    return self;
}

- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)events{
    
    [self.backButton addTarget:target action:action forControlEvents:events];
    [self.FontBigOrSmall addTarget:target action:action forControlEvents:events];
    [self.writeOrRead addTarget:target action:action forControlEvents:events];
    [self.backgroundView addTarget:target action:action forControlEvents:events];
    
    
    
}






@end
